<?php if (!defined('THINK_PATH')) exit();?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title>系统管理中心</title>
    <link href="__CSS_ADMIN_PATH__reset.css" rel="stylesheet" type="text/css" />
    <link href="__CSS_ADMIN_PATH__zh-cn-system.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="__CSS_ADMIN_PATH__style/zh-cn-styles1.css" title="styles1" media="screen" />
    <link rel="alternate stylesheet" type="text/css" href="__CSS_ADMIN_PATH__style/zh-cn-styles2.css" title="styles2" media="screen" />
    <link rel="alternate stylesheet" type="text/css" href="__CSS_ADMIN_PATH__style/zh-cn-styles3.css" title="styles3" media="screen" />
    <link rel="alternate stylesheet" type="text/css" href="__CSS_ADMIN_PATH__style/zh-cn-styles4.css" title="styles4" media="screen" />

    <link href="__CSS_ADMIN_PATH__dialog.css" rel="stylesheet" type="text/css" />
    <link href="__CSS_ADMIN_PATH__table_form.css" rel="stylesheet" type="text/css">
    <script src="__JS_PATH__jquery-1.8.3.js" type="text/javascript"></script>
    <script src="__JS_PATH__jquery-ui.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript" src="__JS_PATH__dialog.js"></script>

    <script src="__JS_ADMIN_PATH__wysiwyg.js" type="text/javascript"></script>
    <script src="__JS_ADMIN_PATH__functions.js" type="text/javascript"></script>
    <!--<script src="/public/index/js/lang.js" type="text/javascript"></script>-->

    <script src="__JS_PATH__Validform_v5.3.2.js" type="text/javascript"></script>

    <script type="text/javascript">
        var isIE = (document.all && window.ActiveXObject && !window.opera) ? true : false;
        function Dd(i) {return document.getElementById(i);}
        function Eh(t) {
            var t = t ? t : 'select';
            if(isIE) {
                var arVersion = navigator.appVersion.split("MSIE"); var IEversion = parseFloat(arVersion[1]);
                if(IEversion >= 7 || IEversion < 5) return;
                var ss = document.body.getElementsByTagName(t);
                for(var i=0;i<ss.length;i++) {ss[i].style.visibility = 'hidden';}
            }
        }
        function Es(t) {
            var t = t ? t : 'select';
            if(isIE) {
                var arVersion = navigator.appVersion.split("MSIE"); var IEversion = parseFloat(arVersion[1]);
                if(IEversion >= 7 || IEversion < 5) return;
                var ss = document.body.getElementsByTagName(t);
                for(var i=0;i<ss.length;i++) {ss[i].style.visibility = 'visible';}
            }
        }
    </script>
</head>
<body>


<script type="text/javascript" src="__JS__/jquery.treetable.js"></script>
<script type="text/javascript">
  
  function checknode(obj)
  {
      var chk = $("input[type='checkbox']");
      var count = chk.length;
      var num = chk.index(obj);
      var level_top = level_bottom =  chk.eq(num).attr('level')
      for (var i=num; i>=0; i--)
      {
              var le = chk.eq(i).attr('level');
              if(eval(le) < eval(level_top)) 
              {
                  chk.eq(i).attr("checked",true);
                  var level_top = level_top-1;
              }
      }
      for (var j=num+1; j<count; j++)
      {
              var le = chk.eq(j).attr('level');
              if(chk.eq(num).attr("checked")==true) {
                  if(eval(le) > eval(level_bottom)) chk.eq(j).attr("checked",true);
                  else if(eval(le) == eval(level_bottom)) break;
              }
              else {
                  if(eval(le) > eval(level_bottom)) chk.eq(j).attr("checked",false);
                  else if(eval(le) == eval(level_bottom)) break;
              }
      }
  }
</script>
<div id="main"> <!-- Main, right side content -->
		<div id="content"> <!-- Content begins here -->
			<h2>菜单列表</h2>	
<div class="pad-lr-10">
<div class="table-list">
<form action="__URL__/setNode" method="post">
    <table width="100%" cellspacing="0" id="dnd-example">
	<tbody>
    <?php echo ($categorys); ?>
	</tbody>
    </table>
  
    <div class="btn"><input type="submit" class="button" name="dosubmit" value="确定" /><input type="hidden" class="button" name="roleId" value="<?php echo ($roleid); ?>" /></div>
</form>
</div>
</div>
</div><!-- /Form -->
				
		</div> <!-- END Content -->
		
	</div>
	<script src="__JS__/checkadmin.js" type="text/javascript"></script>